package fms.controller;

import fms.core.IFilter;
import org.apache.log4j.Logger;
import java.util.Observable;
import java.util.Observer;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by adcc on 2016/6/21.
 */
//public class MasController implements Observer{
public class MasController implements IReceiver{
    private Logger logger = Logger.getLogger(MasController.class);
    private IFilter filter;
    ExecutorService pool = Executors.newFixedThreadPool(10);
    public IFilter getFilter() {
        return filter;
    }

    public void setFilter(IFilter filter) {
        this.filter = filter;
    }

    @Override
    public void receiveMsg(Object arg) {
        String msg = (String) arg;
        filter.isFilter(msg);
    }
//    @Override
//    public void update(Observable o, Object arg) {
//        String msg = (String) arg;
//        filter.isFilter(msg);
//
//    }

}
